<?php

namespace app\admin\validate;

use app\admin\model\Menu;
use app\admin\model\UserJob;
use think\Db;
use think\Validate;

class JobForm extends Validate
{
    protected $rule = [
        'name|岗位名' =>'require|max:60',
        'team|团队培养人数' =>'require|number|max:11',
        'vip_number|团队总人数' =>'require|number|max:11',
        'pv|个人要到达的pv' =>'require|number|max:11',
        'commission|佣金比例' =>'require|float',
    ];
    public function add($array){
        return Db::name('users_job')->insert($array);
    }
    public function edit($id,$array){
            return UserJob::edit($id,$array);
    }
}